﻿using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using DAO;
using System.Data;
using System.Data.SqlClient;
namespace BUS
{
    public class DonVi_BUS
    {
        
        public static DataTable GetDonViByLoginName(string userName,SqlConnection ConPQ )
        {
            return DonVi_DAO.GetDonViByLoginName(userName, ConPQ);
        }
        public static DataTable GetDonViAll(SqlConnection ConPQ)
        {
            return DonVi_DAO.GetDonViAll(ConPQ);
        }
        public static DataTable GetDonViDaAdd(int loaiDV)
        {
            return DonVi_DAO.GetDonViDaAdd(loaiDV);
        }

        public static Boolean delDMThuocKhoa(string MaDonVi)
        {
            return DonVi_DAO.delDMThuocKhoa(MaDonVi);
        }

        public static Boolean delAllDMThuocKhoa(int LoaiDV)
        {
            return DonVi_DAO.delAllDMThuocKhoa(LoaiDV);
        }

        public static Boolean insDMThuocKhoa(string MaDonVi, String TenDV
                                            , int LoaiDV, bool Xoa)
        {
            return DonVi_DAO.insDMThuocKhoa(MaDonVi, TenDV, LoaiDV, Xoa);
        }
    }
}
